// --------------------------------------------------------------------------------------------------------------------
// <summary>
//    Defines the App type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

using BrewXML.Core.Data;
using BrewXML.Core.Services.NavigationServices;
using Cirrious.CrossCore;


namespace BrewXML.Core
{
    using Cirrious.CrossCore.IoC;
    using Cirrious.MvvmCross.ViewModels;
    using BrewXML.Core.ViewModels;

    /// <summary>
    /// Define the App type.
    /// </summary>
    public class App : MvxApplication
    {

        #region Initialize View Models
        protected virtual void InitializeViewModels()
        {
            //Mvx.RegisterType<HomePageViewModel, HomePageViewModel>();
            //Mvx.RegisterType<PlayersPageViewModel, PlayersPageViewModel>();
            //Mvx.RegisterType<PlayerDetailPageViewModel, PlayerDetailPageViewModel>();

            Mvx.RegisterSingleton<HopDetailPageViewModel>(new HopDetailPageViewModel());
            Mvx.RegisterSingleton<HomePageViewModel>(new HomePageViewModel());
            Mvx.RegisterSingleton<MiscDetailPageViewModel>(new MiscDetailPageViewModel());
            Mvx.RegisterSingleton<GrainDetailPageViewModel>(new GrainDetailPageViewModel());
            Mvx.RegisterSingleton<StyleDetailPageViewModel>(new StyleDetailPageViewModel());
            Mvx.RegisterSingleton<RecipesPageViewModel>(new RecipesPageViewModel());
            Mvx.RegisterSingleton<RecipeDetailPageViewModel>(new RecipeDetailPageViewModel());
           
            
        }
        #endregion

        #region Initialize Services
        protected virtual void InitializeServices()
        {
            
        }
        #endregion

        /// <summary>
        /// Initializes this instance.
        /// </summary>
        public override void Initialize()
        {
            //this.CreatableTypes()
            //    .EndingWith("Service")
            //    .AsInterfaces()
            //    .RegisterAsLazySingleton();

            ////// Start the app with the First View Model.
            //this.RegisterAppStart<FirstViewModel>();
            InitializeServices();
            InitializeViewModels();

            

        }
    }
}